package com.huowenjie.dao;

import com.huowenjie.entity.User;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.jpa.repository.JpaRepository;

import javax.swing.plaf.ListUI;
import java.util.Date;
import java.util.List;

public interface UserDao extends JpaRepository<User,Integer> {

    //模糊查询
    public List<User> findByNameLike(String name);

    //多条件查询
    public List<User> findByNameEqualsAndPswEquals(String name,String psw);

    //大于等于
    public List<User> findByBrithGreaterThanEqual(Date date);

    //in
    public List<User> findByIdIn(List<Integer> list);

    //分页  模糊
    public Page<User> findByPswLike(String psw, Pageable pageable);



}
